﻿using System;
using System.Windows.Forms;
using System.Collections.Generic;
using VH6I_B4.ProductParsing;
using VH6I_B4.BronBestandReaders;
using VH6I_B4.Datawarehouse;
using System.Globalization;

namespace VH6I_B4
{
    public partial class Form1 : Form
    {
        private DatawarehouseApi _dwh;

        public Form1()
        {
            InitializeComponent();

            string connectionString = "SERVER=127.0.0.1;DATABASE=vh6ib4_dwh;UID=root;";
            _dwh = new DatawarehouseApi(connectionString);
        }

        private void btnTxt_Click(object sender, EventArgs e)
        {
            TxtReader txtReader = new TxtReader(_dwh);
            txtReader.read();
            _dwh.Commit();
        }

        private void btnXml_Click(object sender, EventArgs e)
        {
            XmlReader xmlReader = new XmlReader(_dwh);
            xmlReader.read();
            _dwh.Commit();
        }

        private void btnExcel_Click(object sender, EventArgs e)
        {
            ExcelReader excelReader = new ExcelReader(_dwh);
            excelReader.read();
            _dwh.Commit();

        }

      

        private void button1_Click(object sender, EventArgs e)
        {
            CsvReader csvReader = new CsvReader(_dwh);
            csvReader.read();
            _dwh.Commit();
        }

        private void SQLbtn_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Debug.WriteLine("klik");
            sqlReader sqlReader = new sqlReader(_dwh);
            sqlReader.read();
            //_dwh.Commit();
        }
    }
}
